<div class="evaluations view">
<h2><?php  echo __('Evaluation'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($evaluation['Evaluation']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Institución'); ?></dt>
		<dd>
			<?php echo $this->Html->link($evaluation['Institution']['nombre'], array('controller' => 'institutions', 'action' => 'view', $evaluation['Institution']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Grupo'); ?></dt>
		<dd>
			<?php echo $this->Html->link($evaluation['Group']['name'], array('controller' => 'groups', 'action' => 'view', $evaluation['Group']['id'])); ?>
			&nbsp;
		</dd>	
		<dt><?php echo __('Avance'); ?></dt>
		<dd>
			<?php echo $this->Html->link($evaluation['Preview']['name'], array('controller' => 'previews', 'action' => 'view', $evaluation['Preview']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Evaluador'); ?></dt>
		<dd>
			<?php echo $this->Html->link($evaluation['User']['nombres'], array('controller' => 'users', 'action' => 'view', $evaluation['User']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Plantilla'); ?></dt>
		<dd>
			<?php echo $this->Html->link($evaluation['Plantilla']['titulo'], array('controller' => 'plantillas', 'action' => 'view', $evaluation['Plantilla']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Comentario'); ?></dt>
		<dd>
			<?php echo h($evaluation['Evaluation']['comentario']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Nota Final'); ?></dt>
		<dd>
			<?php echo h($evaluation['Evaluation']['nota']); ?>
			&nbsp;
		</dd>
	</dl>	

<div class="related">
	<?php if (!empty($alumnos)): ?>
	<?php echo $this->Form->create('EvaluationsUser',array('controller'=>'evaluationsUsers','action' => 'add_evaluation')); ?>
		<?php
		$i = 0;
		$id_evaluation=$evaluation['Evaluation']['id'];
		$tipo_evaluation=$evaluation['Evaluation']['tipo'];
		$nota=$evaluation['Evaluation']['nota'];;
		foreach ($alumnos as $alumno): ?>

            <?php
				echo $this->Form->hidden('EvaluationsUser.'.$i.'.user_id',array('label'=>'','value' =>$alumno['u']['id']));
				echo $this->Form->hidden('EvaluationsUser.'.$i.'.evaluation_id',array('label'=>'','value' =>$id_evaluation));
				echo $this->Form->hidden('EvaluationsUser.'.$i.'.nota',array('label'=>'','value' =>$nota));
				echo $this->Form->hidden('EvaluationsUser.'.$i.'.tipo',array('label'=>'','value' => $tipo_evaluation));
				++$i;
			?>
	<?php endforeach; ?>

<?php endif; ?>
				<?php echo $this->Form->end(__('finalizar'),true); ?>
		
</div>
</div>